package model

import "errors"

var ErrNotFound = errors.New("Rows selectd is zero")
var ErrNotUpdated = errors.New("Rows affected by update is zero")
var ErrNotDeleted = errors.New("Rows affected by delete is zero")

var IsConstraintError = errors.New("Constraint failed")
var IsValidationError = errors.New("Validation failed")
var IsNotSingular = errors.New("Name is not singular")

type BannerRel struct {
	Media       []*AttachmentRelationship `json:"media"`
	DelMediaIds []uint64                  `json:"delMediaIds"`
}

type SectionRel struct {
	Media         []*AttachmentRelationship `json:"media"`
	DelMediaIds   []uint64                  `json:"delMediaIds"`
	ProductIds    []uint64                  `json:"productIds"`
	DelProductIds []uint64                  `json:"delProductIds"`
}

type SysUserRel struct {
	RoleIds        []uint64 `json:"roleIds"`
	PositionIds    []uint64 `json:"positionIds"`
	DelRoleIds     []uint64 `json:"delRoleIds"`
	DelPositionIds []uint64 `json:"delPositionIds"`
}

type SysRoleRel struct {
	MenuIds    []uint64 `json:"menuIds"`
	DelMenuIds []uint64 `json:"delMenuIds"`
}
type BlogSectionRel struct {
	Media         []*AttachmentRelationship `json:"media"`
	DelMediaIds   []uint64                  `json:"delMediaIds"`
	ProductIds    []uint64                  `json:"productIds"`
	DelProductIds []uint64                  `json:"delProductIds"`
}
